package com.yunxi.module.system.convert.tenant;

import com.yunxi.module.system.vo.admin.tenant.tenant.TenantSaveReqVO;
import com.yunxi.module.system.vo.admin.user.user.UserSaveReqVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>
 * 租户转换器
 * </p>
 *
 * @author lidy
 * @since 2024-06-06
 */
@Mapper
public interface TenantConvert {

    TenantConvert INSTANCE = Mappers.getMapper(TenantConvert.class);

    default UserSaveReqVO convert02(TenantSaveReqVO bean) {
        UserSaveReqVO reqVO = new UserSaveReqVO();
        reqVO.setUsername(bean.getUsername());
        reqVO.setPassword(bean.getPassword());
        reqVO.setNickname(bean.getContactName()).setMobile(bean.getContactMobile());
        return reqVO;
    }

}
